import Hogan from 'hogan.js'

export default class RenderTemplate  {
	constructor(htmlTemplate,givenData){
		this.htmlTemplate = htmlTemplate;
		this.givenData = givenData;
	}
	render(){
		
		
		return new Promise((resolve,reject) => {
			let template = Hogan.compile(this.htmlTemplate)
			let output = template.render(this.givenData)
			resolve(output)
		})
	}

}